package cn.itcast.day05.demo04;

import java.util.Arrays;

public class Demo01Arrays {
    public static void main(String[] args) {
        int[] intArray = {20, 10, 30};
        for (int i = 0; i < intArray.length; i++) {
            System.out.println(intArray[i]);
        }
        String intStr = Arrays.toString(intArray);
        System.out.println(intStr);
        System.out.println("=================");
        int[] array1 = {2, 1, 3, 10, 6};
        Arrays.sort(array1);
        /*for (int i = 0; i < array1.length; i++) {
            System.out.println(array1[i]);
        }*/
        System.out.println(Arrays.toString(array1));
        String[] array2={"bbb","aaa","ccc"};
        Arrays.sort(array2);
        System.out.println(Arrays.toString(array2));
    }
}
